package com.aiti.lulian.entity.crm;

import com.aiti.base.core.base.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
@ApiModel("CRM跟进记录实体")
@TableName("crm_follow_record")
public class CrmFollowRecord extends BaseEntity {

    @ApiModelProperty("主键")
    @TableId(value = "base_id", type = IdType.ASSIGN_UUID)
    private String baseId;

    /**
     * '1'：客户，'2'：商机，'3'：合同
     */
    @ApiModelProperty("跟进对象类型")
    @TableField("object_type")
    private String objectType;

    @ApiModelProperty("跟进对象ID")
    @TableField("object_id")
    private String objectId;

    @ApiModelProperty("跟进类型")
    @TableField("follow_type")
    private String followType;

    @ApiModelProperty("跟进内容")
    @TableField("content")
    private String content;

    @ApiModelProperty("客户：跟进状态，商机：销售阶段，合同：合同状态")
    @TableField("status")
    private String status;

    @ApiModelProperty("关联的联系人姓名")
    @TableField("linkman")
    private String linkman;

    @ApiModelProperty("关联的联系人ID")
    @TableField("linkman_id")
    private String linkmanId;

    @ApiModelProperty("实际跟进时间")
    @TableField("practical_follow_time")
    private Date practicalFollowTime;

    @ApiModelProperty("下次跟进时间")
    @TableField("next_follow_time")
    private Date nextFollowTime;

    @ApiModelProperty("关联的企业ID")
    @TableField("enterprise_id")
    private String enterpriseId;

    @ApiModelProperty("创建者")
    @TableField("creator")
    private String creator;

    @ApiModelProperty("创建时间")
    @TableField(value = "base_create_time", fill = FieldFill.INSERT)
    private Date baseCreateTime;

    @ApiModelProperty("填写人姓名")
    @TableField(exist = false)
    private String creatorName;

    private String followUpObj;
}